package com.cg.controller;

import com.cg.dto.Result;
import com.cg.dto.ResultUtils;
import com.cg.entity.AppSource;
import com.cg.service.AppSourceService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (AppSource)表控制层
 *
 * @author chengong
 * @since 2024-01-14 15:08:43
 */
@RestController
@RequestMapping("/appSource")
public class AppSourceController {
    /**
     * 服务对象
     */
    @Resource
    private AppSourceService appSourceService;

    /**
     * 查询菜单类型查询菜单集合
     */
    @GetMapping("/queryAppSource")
    public Result<List<AppSource>> queryAppSource(@RequestParam("sourceType") Integer sourceType) {
        List<AppSource> appSources = appSourceService.queryAppSource(sourceType);
        return ResultUtils.returnDataSuccess(appSources);
    }

}

